//
//  YCExamTimeField.m
//  YCSchool
//
//  Created by gmall on 16/5/5.
//  Copyright © 2016年 yanglinxia. All rights reserved.
//  预约考试中  考试时间选择field

#import "YCExamTimeField.h"

@implementation YCExamTimeField

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        UIView *leftView2 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 18, 11)];//11 改成与上面考试科目一样对齐
        UIImageView *rightView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 8, 14)];
        rightView.image = [UIImage imageNamed:@"right_arrow"];
        self.backgroundColor = [UIColor whiteColor];
        self.layer.borderWidth = 1;
        self.layer.borderColor = [UIColor yc_colorWithUInt:0xf0f0f0].CGColor;
        self.layer.cornerRadius = 5;
        self.layer.masksToBounds = YES;
        self.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请选择考试时间" attributes:@{NSForegroundColorAttributeName:[UIColor yc_colorWithUInt:0xb3b3b3],NSFontAttributeName:[UIFont systemFontOfSize:13]}];
        self.font = [UIFont systemFontOfSize:13];
        self.leftView = leftView2;
        self.leftViewMode = UITextFieldViewModeAlways;
        self.rightView = rightView;
        self.rightViewMode = UITextFieldViewModeAlways;
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.rightView.yc_x = self.yc_width - 20;

}

@end
